//
//  HYRootLunBoCollectionViewCell.m
//  qiJi
//
//  Created by 凤利史 on 2018/3/28.
//  Copyright © 2018年 sunrose. All rights reserved.
//

#import "HYRootLunBoCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation HYRootLunBoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
        
        
        NSArray *arrMu = @[@"3479.jpg_wh1200",@"3479.jpg_wh1200",@"3479.jpg_wh1200",@"3479.jpg_wh1200",@"3479.jpg_wh1200"];
        self.cycleScrollView=[SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, DEF_SCREEN_WIDTH, (175)) imageNamesGroup:arrMu];
        self.cycleScrollView.backgroundColor=[UIColor whiteColor];
        self.cycleScrollView.pageControlAliment=SDCycleScrollViewPageContolAlimentCenter;
        self.cycleScrollView.delegate = self;
        self.cycleScrollView.pageDotColor = [UIColor whiteColor]; // 自定义分页控件小圆标颜色
        //dynamic_banner_slide_unse
        self.cycleScrollView.currentPageDotImage=[UIImage imageNamed:@"dynamic_banner_slide_unse"];
        self.cycleScrollView.pageDotImage=[UIImage imageNamed:@"dynamic_banner_slide_nor"];
        self.cycleScrollView.placeholderImage = [UIImage imageNamed:@""];
        //禁止自动滚动
        //        self.cycleScrollView.autoScroll = NO;
        
        [self addSubview:self.cycleScrollView];
    }
    return self;
    
}


#pragma mark - SDCycleScrollViewDelegate
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
{
    NSLog(@"---点击了第%ld张图片", index);
    
    
}

-(void)updateInfo:(NSArray*)SDCycleArr{
    NSMutableArray *myarr=[[NSMutableArray alloc]init];
    for (int i=0; i<SDCycleArr.count; i++) {
        
        //        NSString *str=[SDCycleArr[i] objectForKey:@"pic"];
        //        NSString *urlN=manage(AP_HOST, str);
        //
        //        [myarr addObject:urlN];
    }
    [self.cycleScrollView setLocalizationImageNamesGroup:myarr];
    [self.cycleScrollView reloadInputViews];
}


@end
